package cn.xiaolang;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

/**
 * TODO
 *
 * @author Dean
 * @date 2020-11-20
 */
public class Temp {

    public static void main(String[] args) {
        System.out.println("sfdfwer".hashCode() % Math.pow(2,32));

//        LocalDateTime now = LocalDateTime.now();
//        ZonedDateTime zonedDateTime = ZonedDateTime.now();
//
//        ZoneId gmt8 = ZoneId.of("GMT+08:00");
//        ZoneId utc = ZoneId.of("UTC");
//        ZoneId dfZ = ZoneId.systemDefault();
//
//        System.out.println(ZonedDateTime.now(gmt8));
//        System.out.println(ZonedDateTime.now(utc));
//
//        System.out.println(now.atZone(gmt8));
//        System.out.println(now.atZone(utc));
//
//        // 2020-11-20 14:20:25
//        // 2020-11-20 22:20:25
//        System.out.println(now.atZone(dfZ).toInstant().toEpochMilli());
//        System.out.println(now.atZone(gmt8).toInstant().toEpochMilli());
//        System.out.println(now.atZone(utc).toInstant().toEpochMilli());
////
//        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
////
//        LocalDateTime startTime = LocalDateTime.parse("2020-11-19T08:06:10", df);
//        // 1605773170000
//        System.out.println(startTime + "解析gmt8：" + startTime.atZone(gmt8).toInstant().toEpochMilli());
//        System.out.println(startTime + "解析gmt：" + startTime.atZone(ZoneId.of("GMT")).toInstant().toEpochMilli());
//        System.out.println(startTime + "解析utc：" + startTime.atZone(utc).toInstant().toEpochMilli());
    }
}
